package casa.depesos.app.com.http.data;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class BankCard implements Parcelable {

    @SerializedName("crdef")
    @Expose
    public String id;

    @SerializedName("cref")
    @Expose
    public String cardNo;

    @SerializedName("bid")
    @Expose
    public String name;

    @SerializedName("acctNo")
    @Expose
    public String bankNo;

    @SerializedName("com")
    @Expose
    public String isDefault;

    @SerializedName("ctype")
    @Expose
    public String type;

    protected BankCard(Parcel in) {
        id = in.readString();
        cardNo = in.readString();
        name = in.readString();
        bankNo = in.readString();
        isDefault = in.readString();
        type = in.readString();
    }

    public static final Creator<BankCard> CREATOR = new Creator<BankCard>() {
        @Override
        public BankCard createFromParcel(Parcel in) {
            return new BankCard(in);
        }

        @Override
        public BankCard[] newArray(int size) {
            return new BankCard[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(cardNo);
        dest.writeString(name);
        dest.writeString(bankNo);
        dest.writeString(isDefault);
        dest.writeString(type);
    }
}
